//
//  ViewController.swift
//  Schedule
//
//  Created by CallMeLaomi on 06/13/2021.
//  Copyright (c) 2021 CallMeLaomi. All rights reserved.
//

import UIKit
import Scheule_Extension
import CTMediator
import Schedule

class ViewController: UIViewController {

    override func viewDidLoad() {
        super.viewDidLoad()
        // Do any additional setup after loading the view, typically from a nib.
        
    }

    override func didReceiveMemoryWarning() {
        super.didReceiveMemoryWarning()
        // Dispose of any resources that can be recreated.
    }

    func reloadData() -> Void {
        
        print(self);
    }
    
    @IBAction func btnPressed(_ sender: Any) {
        
        let hh = {
            (x:Any)->Void in
            print("闭包执行了,参数是\(x)");
            self.navigationController?.popToViewController(self, animated: true);
            // 相关事后刷新工作等
            self.reloadData();
        }
        hh("hh");
        let aaa:VSScheduleDictionary = [VSScheduleParamKey.idParam:"idd",VSScheduleParamKey.callbackKey:hh];
//        aaa.removeValue(forKey: VSScheduleParamKey.callbackKey);
        let  vc:UIViewController = CTMediator.sharedInstance().abcde(param: aaa as NSDictionary as! VSScheduleDictionary) ;
        self.navigationController?.pushViewController(vc, animated: true);
    }
}

